package com.decent.ejfadmin.function.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * 平台配置sql管理
 *
 * @author hejunlei
 */
@Mapper
@Repository
public interface PlatFunctionDao {
    /**
     * 查询平台配置信息
     *
     * @param id 配置id
     * @return 值
     */
    @Select("select value from yuhuang_sup_config where id = #{id} and state = 1")
    String queryPlatConfig(@Param("id") int id);

    /**
     * 通过key查询平台配置
     *
     * @param key key
     * @return 返回配置
     */
    @Select("select `value` from yuhuang_sup_config where `key` = #{key}")
    String queryPlatConfigBykey(@Param("key") String key);

}
